#pragma once

#include "limbo/details/traits.hpp"
#include "limbo/ethernet/mac_address.h"
#include "limbo/ip/ipv4_address.h"
#include "operation.h"

namespace limbo::arp {

template <typename State> struct ArpContext {
  using ContextState = State;
  using LowerContext = details::lower_context_t<State>;

  ip::IPv4Address ip_source;
  ip::IPv4Address ip_target;
  ethernet::MacAddress mac_source;
  ethernet::MacAddress mac_target;
  Operation operation;

  LowerContext *eth_context;
};

template <typename State>
inline auto *get_lower_context(const ArpContext<State> &ctx) {
  return ctx.eth_context;
}

} // namespace limbo::arp
